import { shopName } from '@/api/shop';
export default {
	methods: {
		getshopName(...keys){
			return new Promise((resolve, reject) => {
				const shop_id = window.sessionStorage.getItem('id');
				if(shop_id === null){
					const shop_id = this.$util.getLocationParam("shop_id")
					this.$reqGet(`${shopName}/${shop_id}`).then(res => {
						const data = res.data.data;
						this.$util.setSessionStorage(data);
						resolve(data);
					}).catch(reject)
				}else{
					resolve(this.$util.getSessionStorage(...keys))
				}
			})
		},
	}
}